const mongoose = require('mongoose');

const ArticleSchema = new mongoose.Schema({
	name: { type: String },
	userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
	time: {
		type: String,
		default: Date.now
	},
	content: { type: String },
	replyCon: {
		type: [
			{
				type: mongoose.Schema.Types.ObjectId,
				ref: 'Menu'
			}
		]
	}
});

const Article = mongoose.model('Article', ArticleSchema);
module.exports = {
	Article
};
